﻿<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>建议列表</title>
<style>
* {
	margin: 0;
	padding: 0;
}

body {
	width: 100%;
	display: flex;
	justify-content: center;
	color: #409EFF;
}

header {
	display: flex;
	justify-content: space-between;
	margin-bottom:20px;
}

.header-right {
	display: flex;
	align-items: flex-end;
}

.btn {
	text-decoration: none;
	background-color: #409EFF;
	border-radius: 5px;
	padding: 0 10px;
	margin-left: 15px;
	height: 30px;
	line-height: 30px;
	color: #fff;
	font-weight: 700;
}

.btn:hover {
	background-color: #3090F0;
}

.user-info {
	line-height: 30px;
	font-size: 20px;
}

.opinoin-book {
	margin-top: 30px;
}

table {
	width: 900px;
	border-collapse: collapse;
}

.name {
	color: #388FE3;
}

thead {
	background-color: #FAFAFA;
	border-bottom: 1px solid #F1F1F1;
}

tr {
	height: 50px;
	border-bottom: 1px solid #F1F1F1;
}

th {
	padding: 16px;
	text-align: left;
}

td {
	color: #5A5A5A;
	text-align: left;
	vertical-align: middle;
	width: auto+ 32px;
	padding: 16px;
}

.tag {
	font-size: 12px;
	border-radius: 2px;
	display: inline-block;
	padding: 3px 5px;
}

.green {
	color: #63C241;
	background-color: #F6FFED;
	border: 1px solid #BDE5A2;
}

.blue {
	color: #3B53D7;
	background-color: #F0F5FF;
	border: 1px solid #B3C7F5;
}

.chengse {
	color: #E66732;
	background-color: #FEF3E8;
	border: 1px solid #F4C9AD;
}

.add-one{
	background-color: #409EFF;
	text-decoration:none;
	border-radius:100%;
	padding:5px;
	color:#fff;
	opacity:.8;
}

.add-one:hover{
	opacity:1;
}

span {
	margin-left: 10px;
}
</style>
</head>
<body>
	<div class="opinoin-book">
		<header>
			<div class="header-left">
				<h1>公司意见簿</h1>
			</div>
			<div class="header-right">
				<div class="user-info">欢迎您:${cur_username}(积分:${cur_score})</div>
				<a href="add" class="btn">我要建议</a> <a href="logout" class="btn">退出登录</a>
			</div>
		</header>
		<table align="center" width="90%" cellspacing="0px">
			<thead>
				<tr>
					<th>编号</th>
					<th>建议</th>
					<th>认同人数</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${allList}" var="item">
					<tr>
						<td>${item.getId()}</td>
						<td>${item.getContent()}</td>
						<td>${item.getAgree()}</td>
						<td><a href="addAgree?opinoin_id=${item.getId()}" class="add-one">+1</a></td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
	</div>
</body>
</html>